﻿
(function (window, angular, undefined) {
    'use strict';
    angular.module("ngRestUrls", ["ng"]).config(["$provide", function ($provide) {
        var restUrls = [];
        restUrls.base = "http://educrm.anoah.com/api/index.php?route=";
        
        
        restUrls.add = function (name, url) {
            restUrls[name] = restUrls.base + url;
        };


        //用户个人中心信息
        restUrls.add("getCustomerInfo", "account/account/userprofile");
        //用户签到情况
        restUrls.add("getSignRecords", "account/sign/getSignRecords");
        //用户签到
        restUrls.add("checkIn", "account/sign");
        //获取产品列表
        restUrls.add("loadProductListByCategory","catalog/category");
        //获取产品详情
        restUrls.add("GetProductDetail", "catalog/product");
        //修改用户信息
        restUrls.add("EditCustomerInfo", "account/account/editCustomerInfo");



        //获取用户优学派绑定机器
        restUrls.add("getCustomerHardWare", "account/account/getCustomerHardWare");
        //获取兑换的订单列表
        restUrls.add("loadOrdersProduct", "catalog/category/getOrderProducts");
        //获取广告位图片
        restUrls.add("getBannerImagesById", "design/banner/getBannerImagesById");
        //结算
        restUrls.add("Settlement", "checkout/checkout/settlement");
        //获取订单列表
        restUrls.add("getOrderList", "account/order");

        //喜欢
        restUrls.add("LikeProduct", "catalog/product/like");
        //获取收货地址列表
        restUrls.add("getAddessList", "account/address");

        //获取省级数据
        restUrls.add("getCountry", "account/address/country");

        //获取市级数据
        restUrls.add("getZone", "account/address/zone");

        //获取县区级数据
        restUrls.add("getDistrict", "account/address/district");

        //添加地址
        restUrls.add("addAddress", "account/address/add");

        

        //获取订单详细
        restUrls.add("getOrderInfo", "account/order/info");

        //获取用户礼品
        restUrls.add("getCustomerLotteryRecord", "account/account/customerLotteryRecord");
        
        //添加商品评价
        restUrls.add("addReview", "catalog/product/addproductreview");

        //发送手机验证码
        restUrls.add("phoneValidate", "common/tool/sendmsg");

        //登陆
        restUrls.add("login", "account/account/login");

        //注册
        restUrls.add("register", "account/account/wxregisterbind");


        //获取优惠券列表
        restUrls.add("getCouponList", "account/coupon");

        //用户获取优惠券
        restUrls.add("getCoupon", "account/account/getcoupon");

        //生成秒杀订单
        restUrls.add("generateMsOrder", "checkout/checkout/msindex");

        //生成支付数据
        restUrls.add("generateOrderPay", "wxpay/payorder");


        //设置默认地址
        restUrls.add("setDefaultAddress", "account/address/setDefault");
        
        //初始化微信js
        restUrls.add("weiXinSetting", "common/setting");

        //获取订单邮费
        restUrls.add("getOrderfreight", "account/order/getOrderTotalInfo");

        //获取订单物流相关信息
        restUrls.add("getLogisticsByApi", "account/order/getLogisticsByApi");
        
        //获取指定活动奖品信息
        restUrls.add("getLotteryRewardsByLotteryId", "account/lottery/getLotteryRewardByLotteryId");

        //判断用户今天是否抽过奖了
        restUrls.add("getCustomerIsLotteryByToday", "account/lottery/getCustomerIsLotteryByToday");
        
        //添加抽奖记录
        restUrls.add("addCustomerLotteryRecord", "account/lottery/addCustomerLotteryRecord");

        //改变用户积分
        restUrls.add("updateCustomerPoints", "account/reward/updateReward");
        
        //生成获取抽取商品订单
        restUrls.add("receiveLottery", "checkout/checkout/receivelottery");


        //编辑家长信息
        restUrls.add("editParent", "account/account/editParent");
        //编辑推荐人信息

        //获取注册用户的推荐人
        restUrls.add("getRecommendUser","account/account/getRecommendUser");

        //注册用户添加推荐人
        restUrls.add("addRecommend", "account/account/AddRecommend");

        //修改孩子
        restUrls.add("modifyChild", "account/account/modifyChild");

        //获取指定孩子
        restUrls.add("getChildBySort", "account/account/getChildBySort");

        //获取用户绑定的孩子
        restUrls.add("getCustomerChilds","account/account/getCustomerChilds");

        //注册后编辑信息第一步
        restUrls.add("editCustomerInfoOne","account/account/editCustomerInfoOne");

        //注册后编辑信息第二步
        restUrls.add("editCustomerInfoTwo","account/account/editCustomerInfoTwo");

        //用户今日签到排名
        restUrls.add("getTodaySignRank","account/sign/getTodaySignRank");

        //用户积分数据记录
        restUrls.add("getCustomerRewardRecords","account/reward/getCustomerRewardRecords");

        //内容管理
        restUrls.add("mySubscriptions", "wp/post/mySubscriptions");
        restUrls.add("subscription", "wp/post/Subscription");
        restUrls.add("getMyCategoryList", "wp/category/getMyCategoryList");
        restUrls.add("getCategoryList", "wp/category/getList");
        restUrls.add("bindCategoryList", "wp/category/bind");
        restUrls.add("comment", "wp/post/comment");

        restUrls.add("getTop4Posts", "wp/post/getTop4Posts");

        restUrls.add("getMyPages", "wp/page/getMyPages");
        restUrls.add("getPage", "wp/page/Page");
        restUrls.add("getUnreadCount", "wp/page/unReadCount");
        restUrls.add("commentPage", "wp/page/comment");


        restUrls.add("getMyActivities", "wp/activity/getList");
        restUrls.add("getActivity", "wp/activity/getItem");
        restUrls.add("commentActivity", "wp/activity/comment");


        restUrls.add("getFeedbackList", "wp/feedback/getList");
        restUrls.add("feedback", "wp/feedback/feedback");

        restUrls.add("getFeedbackUnreadCount", "wp/feedback/unReadCount");

        restUrls.add("getUserDefine", "account/user_define/getUserDefine");

        restUrls.add("getCutomerRewardTotal","account/reward/getCutomerRewardTotal");

        restUrls.add("getQuestions","account/question/getQuestions");

        restUrls.add("saveHardWare","account/account/saveHardWare");
        //获取机型列表接口
        restUrls.add("getProductCateInfo","account/account/getProductCateInfo");
        //获取网点接口
        restUrls.add("getNetworkInfo","account/account/getNetworkInfo");
        //获取优学派区域列表
        restUrls.add("getAreaInfo","account/account/getAreaInfo");
        $provide.constant("$restUrls", restUrls);
    }])
})(window, window.angular)